package com.springboot.news.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
import java.time.LocalDateTime;
import java.util.Date;

@Data
public class FruitDTO {
    @NotNull(groups = Update.class)
    private Integer id;
    private String fruitName;
    private String fruitDesc;
    private String fruitPrice;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    public interface Add extends Default {};
    public interface Update extends Default{};
}
//po 实体类 数据库做映射 dto 业务传输 vo 前端视图